
import QtQuick.Shapes 1.14
import QtGraphicalEffects 1.14
import QtQuick.Extras 1.4
import Qt.labs.platform 1.1
import QtQuick.Controls 2.15
import QtQuick 2.15
import QtQuick.Layouts 1.14

Item {
    id:root
    width:1024
    height:600
    signal quitClicked()

    Rectangle{
        anchors.fill: parent
        // color: "transparent"

        Image {
            id: root_bacground
            source: "qrc:/img/bacground.png"
            anchors.fill: parent
        }
        //顶部
        Rectangle {
            id:_title
            anchors.top: parent.top
            width: 1024
            height: 60
            LinearGradient {
                anchors.fill: parent
                start: Qt.point(1024, 0)  // 从右侧开始
                end: Qt.point(0, 0)    // 到左侧结束
                gradient: Gradient {
                    GradientStop { position: 0.0; color: Qt.rgba(36/255.0, 207/255.0, 197/255.0, 0.8) }
                    GradientStop { position: 1.0; color: Qt.rgba(0/255.0, 28/255.0, 99/255.0, 0.8) }
                }
            }

            Rectangle {
                width: 60
                height: 60
                color: "transparent"
                anchors.leftMargin: 10
                MouseArea{
                    anchors.fill: parent
                    onReleased: {
                        img_back.source ="qrc:/img/left-arrow-white.png"
                        root.quitClicked()
                    }
                    onPressed: {
                        img_back.source ="qrc:/img/left-arrow-green.png"
                    }
                }
                Image {
                    id:img_back
                    height: 40
                    width: 40
                    source: "qrc:/img/left-arrow-white.png"
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.horizontalCenter: parent.horizontalCenter
                    // anchors.leftMargin: 10
                }
            }
        }
        //main
        Rectangle {
            color: "transparent"
            id:_main
            anchors.top: _title.bottom
            anchors.topMargin: 1
            width: 1024
            height: 540

            RowLayout {
                spacing: 2
                anchors.fill: parent

                //预览框
                Rectangle {
                    width: 682
                    height: 540
                    color:Qt.rgba(255,255,255,0.4)
                }
                //设置框
                Rectangle {
                    width: 340
                    height: 540
                    color:"transparent"
                    ExPrintSettingMenu{
                        anchors.fill: parent
                        clip: true
                    }
                    ExNumKeyBoard{
                        id:num_keyboard
                        anchors.fill: parent
                        visible:false
                        input_num:'23.6'
                        itemIcon: 'qrc:/img/width.png'
                        // onAcceptClicked: {
                        //    visible=false
                        //    console.log('numberText',numberText)
                        // }

                    }
                }
            }
        }

    }


}
